<template>
  <div class="trackRecordPage">
    <Timeline v-if="trackList.length > 0">
      <TimelineItem v-for="item in trackList" :key="item.log_id">
        <p class="time">{{item.employee_name}} <span class="datetime">{{item.log_time}}</span></p>
        <p class="content">{{item.log_desc}}</p>
      </TimelineItem>
    </Timeline>
    <div v-else>
      <el-empty description="暂无跟踪记录~"></el-empty>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      ptrackList: {
        type: Array,
        default: []
      },
    },
    data() {
      return {
        trackList: []
      }
    },
    watch: {
      ptrackList(newValue, oldValue) {
        this.trackList = newValue
      }
    },
  }
</script>

<style scoped lang="less">
  .trackRecordPage {
    padding: 10px;
    .datetime {
      padding: 0 10px;
      color: #999;
    }
  }
</style>
